var mongoose = require('mongoose');

mongoose.connect('mongodb://grid.inf.unisi.ch/assignment/davicos');

var Schema = mongoose.Schema,
    ObjectId = Schema.ObjectId;

function toLower (v) { return v.toLowerCase() }

exports.UserSchema = new Schema({
	id: {type : String},
	name: {type : String},
	password: {type : String},
	type: {type: String}
})


exports.ProjectSchema = new Schema({
	name: {type : String},
	users: {type : Array},
	path: {type : String},
	type: {type : String}
})

exports.SessionSchema = new Schema({
	session : {type : String}
})
